/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-10 16:49:18
 * @LastEditTime: 2022-11-23 14:28:02
 */
import { createContext, useReducer, useEffect, useContext } from 'react';
import { SET_CHART_TYPE } from '../constants';
import { IdentificationDisposalReducer } from '../reducers/IdentificationDisposalReducer';
const initialState = {
  dataList: [
    {
      time: 2007,
      operators: '操作人1',
      configurationType: '单位管理',
      type: '文书档案',
      frequency: 20,
      delect: 342,
      update: 2399,
      read: 3010
    },
    {
      time: 2008,
      operators: '操作人2',
      configurationType: '全宗管理',
      type: '科技档案',
      frequency: 25,
      delect: 34,
      update: 2439,
      read: 3120
    },
    {
      time: 2009,
      operators: '操作人3',
      configurationType: '档案类型配置',
      type: '电子档案',
      frequency: 34,
      delect: 42,
      update: 2599,
      read: 2020
    },
    {
      time: 2010,
      operators: '操作人4',
      configurationType: '元数据配置',
      type: '其他档案',
      frequency: 210,
      delect: 32,
      update: 4399,
      read: 1020
    }
  ]
};
const IdentificationDisposalContext = createContext();
const IdentificationDisposalContextProvider = (props) => {
  const [state, dispatch] = useReducer(IdentificationDisposalReducer, initialState);
  const actions = {};
  useEffect(() => {}, []);
  return (
    <IdentificationDisposalContext.Provider value={{ ...state, ...actions }}>
      {props.children}
    </IdentificationDisposalContext.Provider>
  );
};
export const useIdentificationDisposalContext = () => {
  return useContext(IdentificationDisposalContext);
};
export { IdentificationDisposalContext, IdentificationDisposalContextProvider };
